#include <stdio.h>
#include <string.h>

int
main ()
{
	char first[10100];
	char sec[10100];
	char *p;
	int result = 0;

	freopen("substring.in", "r", stdin);
	freopen("substring.out", "w", stdout);
	memset(first, 0, sizeof(first)); //debug
	memset(sec, 0 , sizeof(sec)); //debug

	scanf("%s\n%s", first, sec);

	p = sec;
	while ( (p = strstr(p, first)) != NULL ) {
		++result;
		++p;
	}
	printf("%d\n", result);
	return 0;
}
